package com.telit.firecommand.constant;

import java.util.List;
import java.util.stream.Stream;

import static java.util.stream.Collectors.toList;


/**
 * @author zhouyu
 * @description 火情常量
 */
public class FireConstant {

    public static final String FIRE_FIGHTING_TEAM_TYPE = "fire_fighting_team";
    public static final String FIRE_ORGANIZATION_TYPE = "fire_organization";
    public static final String FIRE_ISOLATIONBELT_TYPE = "fire_isolationbelt";
    //防火检查点
    public static final String FIRE_CHECKPOINT_TYPE = "fire_checkpoint";
    public static final String FIRE_WATCHTOWER_TYPE = "fire_watchtower";
    //防火物资储备库
    public static final String FIRE_MATERIAL_STORAGE_TYPE = "fire_material_storage";
    public static final String FIRE_PROPAGANDA_TABLET_TYPE = "fire_propaganda_tablet";
    //取水点
    public static final String FIRE_WATER_POINT_TYPE = "fire_water_point";
    public static final String FIRE_PARKING_APRON_TYPE = "fire_parking_apron";
    public static final String TEAM_BARRACKS_TYPE = "team_barracks";
    public static final String AVIATION_STATION_TYPE = "aviation_station";
    public static final String FIRE_MATERIAL_TYPE_TYPE = "fire_material_type";
    public static final String COMMUNICATION_FACILITIES_TYPE = "communication_facilities";
    public static final String CAMERA_INFO = "camera_info";
    // 通讯基站
    public static final String COMM_BASE_STATION = "communication-base-station";
    //泵房
    public static final String COMM_PUMP_HOUSE="pump_house";
    //防火宣传设施
    public static final String COMM_PULICITY_FACILITIES="publicity_facilities";
    //防火阻隔系统
    public static final String COMM_FIRE_BARRIER_SYSTEM="fire_barrier_system";
    // 防火道路
    public static final String FIRE_ROAD = "fire_road";
    // 公墓
    public static final String CEMETERY = "cemetery";
    // 防火管道
    public static final String FIRE_PIPELINE = "fire_pipeline";
    // 焚烧池
    public static final String FIRE_POND = "fire_pond";
    // 护林站点
    public static final String PROTECTION_FOREST_STATION = "protection_forest_station";
    // 语音播报器
    public static final String VOICE_ANNOUNCER = "voice_announcer";
    // 蓄水池
    public static final String WATER_STORAGE_POND = "water_storage_pond";
    // 护林员
    public static final String FORESTER_INFO = "forester";
    // 飞手
    public static final String UAV_INFO = "uav_user";
    //  气象监测站
    public static final String MONITORING_STATION = "monitoring_station";
    // 无人机
    public static final String UAV = "uav";
    //森林防火专业队
    public static final String FIRE_PROFESSION_TYPE = "fire_profession";
    //森林防火半专业队
    public static final String FIRE_SEMIPROFESSION_TYPE = "fire_semiprofession";
    //森林防火专业队人员
    public static final String FIRE_PROFESSION_PERSON_TYPE = "fire_profession_person";
    //森林防火半专业队人员
    public static final String FIRE_SEMIPROFESSION_PERSON_TYPE = "fire_semiprofession_person";
    //扑火队人员
    public static final String FIRE_FIGHTING_TEAM_PERSON_TYPE = "fire_fighting_team_person";
    /**
     * 重点人员
     */
    public static final String KEY_PEOPLE = "key_people";
    //重点火源点
    public static final String FIRE_POINT="fire_point";


    public static final List<String> RESOURCE_LIST = Stream.of(FireConstant.AVIATION_STATION_TYPE,
            FireConstant.CAMERA_INFO
            , FireConstant.CEMETERY, FireConstant.COMMUNICATION_FACILITIES_TYPE, FireConstant.FIRE_CHECKPOINT_TYPE,
            FireConstant.FIRE_FIGHTING_TEAM_TYPE
            , FireConstant.FIRE_ISOLATIONBELT_TYPE, FireConstant.FIRE_MATERIAL_STORAGE_TYPE,
            FireConstant.FIRE_MATERIAL_TYPE_TYPE
            , FireConstant.FIRE_ORGANIZATION_TYPE, FireConstant.FIRE_PARKING_APRON_TYPE, FireConstant.FIRE_PIPELINE
            , FireConstant.FIRE_POND, FireConstant.FIRE_PROPAGANDA_TABLET_TYPE, FireConstant.FIRE_ROAD,
            FireConstant.FIRE_WATCHTOWER_TYPE, FireConstant.FIRE_WATER_POINT_TYPE, FireConstant.FORESTER_INFO,
            FireConstant.PROTECTION_FOREST_STATION
            , FireConstant.TEAM_BARRACKS_TYPE, FireConstant.VOICE_ANNOUNCER, FireConstant.WATER_STORAGE_POND
            , FireConstant.FORESTER_INFO, FireConstant.UAV_INFO, FireConstant.MONITORING_STATION,
            FireConstant.COMM_BASE_STATION, FireConstant.COMM_PUMP_HOUSE
            , FireConstant.COMM_PULICITY_FACILITIES, FireConstant.FIRE_PROFESSION_TYPE,
            FireConstant.FIRE_SEMIPROFESSION_TYPE
            , FireConstant.FIRE_PROFESSION_PERSON_TYPE, FireConstant.FIRE_SEMIPROFESSION_PERSON_TYPE,
            FireConstant.FIRE_FIGHTING_TEAM_PERSON_TYPE, KEY_PEOPLE
    ).collect(toList());

    /**
     * 配置前缀
     */
    public static final String FIRE_PREFIX = "fire";

    /**
     * alarms服务正确返回码
     */
    public static final String ALARMS_SUCCESS_CODE = "200";

    /**
     * 区县行政区划编码长度
     */
    public static int DISTRICT_COUNTY_CODE_LENGTH = 6;

    /**
     * 乡镇行政区划编码长度
     */
    public static int DISTRICT_TOWN_CODE_LENGTH = 9;

    /**
     * 村行政区划编码长度
     */
    public static int DISTRICT_VILLAGE_CODE_LENGTH = 12;

    /**
     * 获取历史视频回放时间间隔
     */
    public static final int CAMERA_PLAYBACK_URL_PERIOD = 12;

}

